package Entity;
import FinalProject.PriceException;

public class Entity_Electronics extends Entity_Product {
    private String brand;

    public Entity_Electronics(String id, String name, double price, String description, String brand) throws PriceException {
        super(id, name, price, description);
        this.brand = brand;
    }

    @Override
    public void displayInfo() {
        System.out.println("【电子产品】");
        System.out.println("编号：" + getId() + "，名称：" + getName());
        System.out.println("价格：" + getPrice() + "元，品牌：" + brand);
        System.out.println("描述：" + getDescription());
    }

    // 特有方法：保修查询
    public void checkWarranty() {
        System.out.println("保修信息：" + getName() + "提供1年联保");
    }

    public String getBrand() { return brand; }
}